import Swiper, { loadSwiper } from '../components/Swiper';
import Movie, { loadMovie } from '../components/Movie';

const Home = ({ swiper, movie }) => (
  <>
    <Swiper data={swiper} />
    <Movie data={movie} />
  </>
);

const getStaticProps = async () => {
  const { data: swiper } = await loadSwiper();
  const { data: movie } = await loadMovie();
  return {
    props: {
      swiper,
      movie
    }
  };
};

export { Home as default, getStaticProps }
